package com.ktjy;

import entity.Equip;
import entity.Player;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Jianda {
    @Test
    public void Jianda() {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
//      简答2简答3
        Player player1 = (Player) context.getBean("Player1");
        Equip equip4 = (Equip) context.getBean("Equip4");
        player1.updateEquip(equip4);
        System.out.println(player1.getRing().toString());
        System.out.println("-----------------------------------");
        Player player=(Player) context.getBean("player");
        Equip equip=(Equip) context.getBean("equip");
        player.updateEquip(equip);
        System.out.println(player.getRing().toString());

    }
}
